<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>艺点官网后台管理</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- Tell the browser to be responsive to screen width -->
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<!-- Bootstrap 3.3.6 -->
	<link rel="stylesheet" href="/plugin/bootstrap-3.3.6-dist/css/bootstrap.min.css">
	<!-- Font Awesome -->
	<link rel="stylesheet" href="/plugin/font-awesome-4.6.3/css/font-awesome.min.css">
	<!-- Ionicons -->
	<link rel="stylesheet" href="/plugin/ionicons-2.0.1/css/ionicons.min.css">
	<!-- iCheck -->
	<link rel="stylesheet" href="/plugin/iCheck/square/blue.css">
	<!-- Layer -->
	<link rel="stylesheet" href="/plugin/layer-2.4/skin/layer.css">
	<!-- Theme style -->
	<link rel="stylesheet" href="/css/manage/AdminLTE.min.css">
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
	<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
	<![endif]-->
</head>
<body class="hold-transition login-page">
<div class="login-box">
	<div class="login-logo">
		<a href=""><b>艺点</b>后台管理</a>
	</div>
	<!-- /.login-logo -->
	<div class="login-box-body">
		<p class="login-box-msg">欢迎光临，请先登录。</p>
		<form action="/manage/login" method="post">
			{{ csrf_field() }}
			<div class="form-group has-feedback">
				<input name="email" type="email" class="form-control" placeholder="邮箱" autofocus required>
				<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
			</div>
			<div class="form-group has-feedback">
				<input name="password" type="password" class="form-control" placeholder="密码" minlength="5" required>
				<span class="glyphicon glyphicon-lock form-control-feedback"></span>
			</div>
			<div class="row">
				<div class="col-xs-8">
					<div class="form-group has-feedback">
						<input name="captcha" type="text" class="form-control" placeholder="验证码" minlength="3" maxlength="5" required>
					</div>
				</div>
				<!-- /.col -->
				<div class="col-xs-4">
					<img id="captcha" src="captcha" onclick="this.src='captcha?'+Math.random()" style="cursor:pointer" alt="点击刷新验证码" title="点击刷新验证码">
				</div>
				<!-- /.col -->
			</div>
			<div class="row">
				<!-- /.col -->
				<div class="col-xs-12">
					<button type="submit" class="btn btn-primary btn-block btn-flat">登 录</button>
				</div>
				<!-- /.col -->
			</div>
		</form>
		<!-- /.social-auth-links -->
		<a href="#">忘记密码？</a><br>
	</div>
	<!-- /.login-box-body -->
</div>
<!-- /.login-box -->
<!-- jQuery 2.2.0 -->
<script src="/plugin/jquery/jquery-2.2.1.min.js"></script>
<script src="/plugin/jquery/jquery.cookie.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/plugin/bootstrap-3.3.6-dist/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="/plugin/iCheck/icheck.min.js"></script>
<!-- Layer -->
<script src="/plugin/layer-2.4/layer.js"></script>
<script src="/js/manage/common.js"></script>

</body>
</html>
<script type="text/javascript">
	$(function () {
		$("form").submit(function(event) {
			event.preventDefault();
			var url = $(this).attr('action');
			ajaxToken({
				url: url,
				type: "POST",
				data: $("form").serialize(),
				dataType: "json",
				success: function(data) {
					console.log(data);
					if (data.code == 100) {
						window.location.href = "index";
					} else {
						if (data.code == 102) {
							$("#captcha").click();
							$("input[name='captcha']").select();
						}
						layer.msg(data.msg);
					}
				}
			});
		});
	});
</script>